xen: Work around Clang-IAS macro \@ expansion bug
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 3 Mar 2023 07:00:04 +0000 (08:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Mar 2023 07:00:04 +0000 (08:00 +0100)
commit837bdc6eb2df796e832302347f363afc820694fe
tree5e0e27edd0458767473bdbd0e046891606ffc831
parente8f28e129d23c940749c66150a89c4ed683a0fb9
xen: Work around Clang-IAS macro \@ expansion bug

https://github.com/llvm/llvm-project/issues/60792

It turns out that Clang-IAS does not expand \@ uniquely in a translaition
unit, and the XSA-426 change tickles this bug:

  <instantiation>:4:1: error: invalid symbol redefinition
  .L1_fill_rsb_loop:
  ^
  make[3]: *** [Rules.mk:247: arch/x86/acpi/cpu_idle.o] Error 1

Extend DO_OVERWRITE_RSB with an optional parameter so C callers can mix %= in
too, which Clang does seem to expand properly.

Fixes: 63305e5392ec ("x86/spec-ctrl: Mitigate Cross-Thread Return Address Predictions")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: a2adacff0b91cc7b977abb209dc419a2ef15963f
master date: 2023-02-24 17:44:29 +0000
xen/arch/x86/include/asm/spec_ctrl.h
xen/arch/x86/include/asm/spec_ctrl_asm.h